package com.joysuch.wwyt.bp.enums;

/**
 * @Author ZhangDong
 * @Date 2020/4/22 15:14
 */
public enum AccidentType {

    A(1, "A级"), B(2, "B级"), C(3, "C级"), D(4, "D级"), E(5, "E级"), OTHERS(6, "其他");
    private Integer level;
    private String levelName;

    AccidentType(Integer level, String levelName) {
        this.level = level;
        this.levelName = levelName;
    }

    /*public String getLevelName() {
        return this.levelName;
    }

    public Integer getLevel() {
        return this.level;
    }*/

    public static String getLevelName(Integer level) {
        AccidentType[] values = AccidentType.values();
        for (AccidentType value : values) {
            if (value.level.equals(level)) {
                return value.levelName;
            }
        }
        return null;
    }
}
